package com.ftf.tp.message.infrastructure.repository;

import com.ftf.tp.message.domain.directMessage.dos.NoticeEventDO;
import com.ftf.tp.message.domain.directMessage.repository.NoticeEventRepository;
import com.ftf.tp.message.infrastructure.converter.NoticeEventConverter;
import com.ftf.tp.message.infrastructure.mapper.NoticeEventMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @author tanghao
 * @date 2022/9/2
 */
@Repository
public class NoticeEventRepositoryImpl implements NoticeEventRepository {

    @Resource
    private NoticeEventMapper noticeEventMapper;

    /**
     * 保存通知事件
     *
     * @param noticeEventDO 通知事件实体
     */
    @Override
    public void save(NoticeEventDO noticeEventDO) {
        noticeEventMapper.insert(NoticeEventConverter.INSTANCE.doToPo(noticeEventDO));
    }
}
